#set make file for compile and archive a library

# $ make obj
# $ make clean

GCC = /usr/bin/g++
CFLAGS = -fPIC -Os -c -D_FPDFAPI_MT_
INCLUDE = -I/usr/lib/jvm/java-1.7.0/include/linux/ -I/usr/lib/jvm/java-1.7.0/include/ -I/usr/local/fxcore/include 
LIBS = -L/usr/local/fxcore/lib/rel/

SRCPATH = ./src
#OBJPATH = ./obj/rel/x64_linux_gcc/

SFLAGS = -fPIC -shared -o
SHARE_NAME = libPDF2PDF.so

shared:
	$(GCC) $(CFLAGS) $(INCLUDE) $(SRCPATH)/*.cpp
	#mv ./*.o $(OBJPATH)/  
	$(GCC) ./*.o -lpthread $(LIBS) -lfxcore[centos_x64] $(SFLAGS) $(SHARE_NAME) 

clean:
	rm -rf ./*.o
